<template>
  <div class="payment">
    <div class="address">
      <x-input title="收货人" v-model="name" text-align='right' placeholder="请填写收货人姓名"></x-input>
      <x-input title="手机号码" v-model="phone" text-align='right' placeholder="请填写收货人手机号码"></x-input>
      <x-address title="省/市/区" v-model="province" :list="ChinaAddressV4Data" placeholder="请选择"></x-address>
      <x-input class="border-none" title="详细地址" v-model="address" text-align='right' placeholder="请输入街道，门牌等详细地址信息"></x-input>
    </div>
    <div class="goods">
      <div class="img">
        <img src="@/assets/gouwuche02.png">
      </div>
      <div class="title">
        <p class="tip">Naef Cublex立方体创意魔创意魔...创意魔...创意魔...创意魔...</p>
        <p class="price">¥368</p>
      </div>
      <div class="num">x1</div>
    </div>
    <div class="goods-all">
      <span class="all-title">商品合计</span>
      <span class="all-price">￥87.70</span>
    </div>
    <div class="goods-all border-none">
      <span class="all-title">运费</span>
      <span class="all-price">￥0.00</span>
    </div>
    <div class="goods-all border-none matop">
      <span class="all-title">支付方式</span>
      <span class="all-price"><img src="@/assets/gongyizhifu02.png" alt=""> 微信支付</span>
    </div>
    <div class="btn">
      <span class="btn-price">应付:<em>￥367</em></span>
      <span class="btn-wx" @click="router({path: 'paysuccess'})">
        去付款
      </span>
    </div>
  </div>
</template>

<script>
import { XInput, XAddress, ChinaAddressV4Data } from 'vux'
export default {
  components: {
    XInput,
    XAddress,
    ChinaAddressV4Data,  
  },
  data () {
    return {
      name: '',
      phone: '',
      address: '',
      province: [],
      ChinaAddressV4Data: ChinaAddressV4Data,
    }
  },
  created () {
  },
  methods: {    
    router (path) {
      this.$router.push(path)
    }
  }
}
</script>
<style lang="stylus">
.payment
  background-color #f2f2f2
  min-width 100vw
  min-height 100vh
  .address
    margin-bottom 1rem
    background-color #fff
    .weui-cell
      padding 0
      span
        font-size 1.5rem
        color #666
      .vux-cell-placeholder
        color #ccc
    .border-none
      border none !important
    .vux-x-input,.vux-cell-box
      padding 0
      line-height 5rem
      height 5rem
      overflow hidden
      margin 0 1.5rem
      border-bottom 1px solid #e5e5e5
      box-sizing border-box
      &::before
        display none
      label
        font-size 1.5rem
        color #666
      input
        font-size 1.5rem
        color #666
        height 5rem
        line-height 5rem
        &::-webkit-input-placeholder
          color #ccc
  .goods
    display flex
    background-color #fff
    margin-bottom 1rem
    padding 2rem 1.5rem
    .img
      width 10rem
      height 7.5rem
      margin-right 1.4rem
    .title
      position relative
      flex 5
      .tip
        font-size 1.5rem
        color #333
        font-weight 500
        width 19rem
        overflow hidden
        white-space nowrap
        text-overflow ellipsis
      .price
        color #666
        font-size 1.3rem
        line-height 1.6rem
        position absolute
        top 3rem
    .num
      flex 1
      text-align right
      line-height 2.1rem
      font-size 1.5rem
      font-weight 500
  .goods-all
    background-color #fff
    line-height 5rem
    height 5rem
    display flex
    font-size 1.5rem
    padding 0 1.5rem
    border-bottom 1px solid #e5e5e5
    .all-title
      flex 1
      text-align left
      color #666
    .all-price
      flex 1
      text-align right
      color #333
      font-weight 500
      position relative
      img       
        position absolute
        width 2.2rem
        top 0
        right 6.9rem
        top 1.5rem
  .border-none
    border none
  .matop
    margin-top 1rem
  .btn
    height 5rem
    line-height 5rem
    position absolute
    bottom 0
    width 100%
    display flex
    font-size 1.5rem
    .btn-price
      width 58%
      background-color #fff
      color #333
      font-size 1.6rem
      line-height 5rem
      padding-left 1.5rem
      box-sizing border-box
      em
        font-size 1.5rem
        margin-left .5rem
    .btn-wx
      width 42%
      background-color #172F6D
      color #fff
      text-align center
</style>